<?php
defined('IN_ADMIN') or exit('No permission resources.');
include $this->admin_tpl('header', 'admin');
?>
<div class="pad-10">
	<form method="post" action="?m=guestbook&c=guestbook_admin&a=reply&gid=<?php echo $_GET['gid']?>" name="myform" id="myform">
		<table class="table_form" width="100%">
			<tbody>
				<tr>
					<th width="80">留言人</th>
					<td><?php echo $an_info['username']?></td>
				</tr>
				<tr>
					<th>留言时间</th>
					<td><?php echo date('Y-m-d H:i:s', $an_info['addtime'])?></td>
				</tr>
				<tr>
					<th>留言标题</th>
					<td><strong><?php echo $an_info['title']?></strong></td>
				</tr>
				<tr>
					<th>留言内容</th>
					<td ><?php echo $an_info['content']?></td>
				</tr>
        <tr>
          <th></th>
          <td></td>
        </tr>
				<tr>
					<th>回复内容</th>
					<td>
            <textarea name="guestbook[replycontent]" id="replycontent"></textarea>
            <?php echo form::editor('replycontent','basic');?>
          </td>
				</tr>
				<tr>
					<th>回复人</th>
					<td><input name="guestbook[replyname]" id="replyname" value="<?php echo $_username?>" class="input-text" type="text" size="30" ></td>
				</tr>
				<tr>
					<th>回复时间</th>
					<td><?php echo form::date('guestbook[replytime]', date('Y-m-d H:i:s'), 1)?></td>
				</tr>
			</tbody>
		</table>
		<input type="submit" name="dosubmit" id="dosubmit" value=" <?php echo L('ok')?> " class="dialog">&nbsp;<input type="reset" class="dialog" value=" <?php echo L('clear')?> ">
	</form>
</div>
</body>
</html>
<script type="text/javascript">

$(document).ready(function(){

	$.formValidator.initConfig({
		formid:"myform",
		autotip:true,
		onerror:function(msg,obj){
			window.top.art.dialog(
        { content:msg, lock:true, width:'220', height:'70' },
        function(){ this.close(); $(obj).focus(); }
      )
		}
	});

});
</script>
